const { Command, Option } = require('commander');
const chalk = require('chalk');
const package = require('./package.json');
const program = new Command();

program.version(package.version);

// chalk.red('--不输入默认执行作用域下的 i18n.json文件')

program
  .option('-d, --debug', 'output extra debugging')
  .option('-s, --small', 'small pizza size')
  .option('-p, --pizza-type <type>', 'flavour of pizza');

program.parse(process.argv);

const options = program.opts();

console.log('options');
console.log(options);

// if (options.debug) console.log(options);
// console.log('pizza details:');
// if (options.small) console.log('- small pizza size');
// if (options.pizzaType) console.log(`- ${options.pizzaType}`);
 
// program.on('--help', function(){
//   console.log('----------------------------------------');
//   console.log('| ', chalk.green('例:'));
//   console.log('| ', chalk.yellow('    tms-cli create app'))
//   console.log('| ', chalk.green('    创建一个名称为app的一个项目'))
//   console.log('| ');
//   console.log('----------------------------------------');
// });
